package com.wbp.cms.core.product.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.wbp.cms.client.product.domain.ProductProfitDO;
import com.wbp.cms.client.product.query.ProductProfitQuery;
import com.wbp.cms.core.dao.BaseDao;

/**
 * @Description:
 * @Department:
 * @author andy.lhc
 * @date 2016年3月9日 下午2:22:08
 */
@Repository("productProfitDAO")
public class ProductProfitDAO extends BaseDao {

  
  public Long  insert(ProductProfitDO  productProfitDO){
    super.insert("ProductProfitMapper.insert", productProfitDO) ;
    return  productProfitDO.getId() ;
  }
  
  public int  update(ProductProfitDO  productProfitDO){
      return  super.update("ProductProfitMapper.update", productProfitDO) ;
  }
   
  public ProductProfitDO  load(Long  id){
    Object obj = super.selectOneObject("ProductProfitMapper.load", id) ;
    return obj == null ? null : (ProductProfitDO)obj ;
  }
  
  public List<ProductProfitDO>  query(ProductProfitQuery  productProfitQuery){
    return  super.selectList("ProductProfitMapper.query", productProfitQuery) ;
  }
  
  public int  delete(Long  id){
     return  super.delete("ProductProfitMapper.delete", id) ;
  }
  
  public int deleteByProductId(Long productId){
    
    return  super.delete("ProductProfitMapper.deleteByProductId", productId) ;
  }
  
}
